home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / INDENT3.ARJ / MAKEFILE < prev    next >
Text File  |  1986-11-02  |  2KB  |  65 lines

  1. # this makefile runs using the public domain make utility `ndmake' by
  2. # Don Kneller. 
  3. #
  4. #
  5. CFLAGS = -AS -Ox
  6. MAPFIL =  nul
  7. SRCS =  indent.c io.c lexi.c parse.c pr_comme.c args.c doindent.c dopreesc.c
  8. OBJS =  indent.obj io.obj lexi.obj parse.obj pr_comme.obj args.obj \
  9.         doindent.obj dopreesc.obj
  10.  
  11. indent.exe : ${OBJS}
  12.                 cl ${OBJS}
  13.  
  14. # make depend can alse make these lines [maybe. . . (it is magic to me)]
  15. indent.obj: indent.c indent_g.h indent_c.h
  16. io.obj: io.c indent_g.h
  17. lexi.obj: lexi.c indent_g.h indent_c.h
  18. parse.obj: parse.c indent_g.h indent_c.h
  19. pr_comme.obj: pr_comme.c indent_g.h
  20. args.obj: args.c indent_g.h
  21. doindent.obj: doindent.c indent_g.h indent_c.h
  22.  
  23. clean :
  24.                rm  ${OBJS} indent.exe
  25.  
  26. .IGNORE: foo
  27. pack :
  28.                 if exist foo del foo
  29.                 exepack indent.exe foo
  30.                 del indent.exe
  31.                 ren foo indent.exe
  32.  
  33. install : indent.exe
  34.                 copy indent.exe \bin
  35.  
  36. arc : ${OBJS} indent.exe
  37.         if exist indent.arc del indent.arc
  38.         arca indent.arc *.c *.h readme indent.man indent.exe \
  39.                         \indent.pro makefile
  40.  
  41. # there is a PC `bawk' that might do this. . .
  42. depend :
  43.                 ${CC} -M ${SRCS} | \
  44.                     awk '{ if ($$1 != prev) { if (rec != "") print rec; \
  45.                 rec = $$0; prev = $$1; } \
  46.                 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
  47.                 else rec = rec " " $$2 } } \
  48.                 END { print rec }' >makedep
  49.         echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
  50.         echo '$$r makedep' >> eddep
  51.         echo 'w' >>eddep
  52.         cp Makefile Makefile.bak
  53.         ed - Makefile < eddep
  54.         rm eddep makedep
  55.         echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
  56.         echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
  57.         echo '# see make depend above' >> Makefile
  58.  
  59. # DO NOT DELETE THIS LINE -- make depend uses it
  60.  
  61. # DEPENDENCIES MUST END AT END OF FILE 
  62. # IF YOU PUT STUFF HERE IT WILL GO AWAY 
  63. # see make depend above 
  64.  
  65.